home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12498 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  843 b 

  1. Path: socrates.moe.edu.sg!s19
  2. From: s19@moe.ac.sg (Training IDs)
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  4. Subject: Re: GOTO controversy
  5. Followup-To: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  6. Date: 1 Apr 1996 08:59:18 GMT
  7. Organization: Ministry of Education
  8. Message-ID: <4jo5t6$1ki@socrates.moe.edu.sg>
  9. References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com>
  10. NNTP-Posting-Host: piaget.moe.edu.sg
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. 1kldfk;df;gj
  14.  
  15. Scott Hawley (shawley@connix.com) wrote:
  16. : What to you think? Loops without using loops?
  17.  
  18. : a loop:
  19.  
  20. : for(i=0;i<10;i++)
  21. : {
  22. :   stuff
  23. : }
  24.  
  25. : Looping with out a loop
  26.  
  27. : no_loop(0,10);
  28.  
  29. : no_loop(int start, int end)
  30. : {
  31. :     if(start != end) {
  32. :         stuff
  33. :         no_loop(start+1,end);
  34. :     }
  35. : }
  36.  
  37. : I haven't tested this but you get the idea.
  38.